(ns conducta.ui)

(defstruct widget-fixture :name :fixture :parent)

;; Text input
(defmulti enter-text (fn[text fixture] (.getClass (:fixture fixture))))
(defmulti delete-text (fn[fixture] (.getClass (:fixture fixture))))
(defmulti select-text (fn[text fixture] (.getClass (:fixture fixture))))
(defmulti select-all (fn[fixture] (.getClass (:fixture fixture))))
(defmulti select-range (fn[start end fixture] (.getClass (:fixture fixture))))

;; Text display
(defmulti verify-text! (fn[text fixture] (.getClass (:fixture fixture))))
(defmulti read-text (fn[fixture] (.getClass (:fixture fixture))))

;; Selectable-option items
(defmulti select (fn 
  ([fixture] (.getClass (:fixture fixture)))
  ([option fixture] (.getClass (:fixture fixture))) )
) 
                 

(defmulti unselect (fn[option fixture] (.getClass (:fixture fixture))))
(defmulti verify-selected! (fn[option fixture] (.getClass (:fixture fixture))))
(defmulti verify-not-selected! (fn[fixture] (.getClass (:fixture fixture))))

;; State verification APIs
(defmulti verify-visible!   (fn[fixture] (.getClass (:fixture fixture))))
(defmulti verify-invisible! (fn[fixture] (.getClass (:fixture fixture))))
(defmulti verify-enabled!   (fn[fixture] (.getClass (:fixture fixture))))
(defmulti verify-disabled!  (fn[fixture] (.getClass (:fixture fixture))))

;; Key input APIs
;; For entering multiple keys, use enter-text
(defmulti type-key (fn[key-letter fixture] (.getClass (:fixture fixture))))
(defmulti press-key   (fn[key-letter fixture] (.getClass (:fixture fixture))))
(defmulti release-key  (fn[key-letter fixture] (.getClass (:fixture fixture))))

;; Mouse input APIs
(defmulti click (fn[fixture] (.getClass (:fixture fixture))))
(defmulti double-click (fn[fixture] (.getClass (:fixture fixture))))
(defmulti right-click (fn[fixture] (.getClass (:fixture fixture))))
(defmulti left-click (fn[fixture] (.getClass (:fixture fixture))))
(defmulti middle-click (fn[fixture] (.getClass (:fixture fixture))))

(defmulti drag-item (fn[text fixture] (.getClass (:fixture fixture))))
(defmulti drop-item (fn 
    ([fixture] (.getClass (:fixture fixture)))
    ([location fixture] (.getClass (:fixture fixture)))
))

